//
//  PSGameInputOptions.h
//  PrefCore
//
//  Created by Sergey on 2/6/14.
//  Copyright (c) 2014 Play-on-smart. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "PSBid.h"

/// Flags for different kinds of user input.
typedef enum {
    // Waiting flags
    kGameInputWaitForTouch = 1
,   kGameInputWaitForResolver = kGameInputWaitForTouch << 1
,   kGameInputWaitForPool = kGameInputWaitForResolver << 1
,   kGameInputWaitForCardAnimation = kGameInputWaitForPool << 1
,   kGameInputWaitForResuming = kGameInputWaitForCardAnimation << 1
,   kGameInputWaitForFastMoving = kGameInputWaitForResuming << 1
,   kGameInputWaitForTrickingTenCheck = kGameInputWaitForFastMoving << 1
    // Input flags
,   kGameInputPass = kGameInputWaitForTrickingTenCheck << 1
,   kGameInputWhistFull = kGameInputPass << 1
,   kGameInputWhistHalf = kGameInputWhistFull << 1
,   kGameInputPlay = kGameInputWhistHalf << 1
,   kGameInputMisere = kGameInputPlay << 1
,   kGameInputDeclare = kGameInputMisere << 1
,   kGameInputDrop = kGameInputDeclare << 1
,   kGameInputStand = kGameInputDrop << 1
,   kGameInputWithoutThree = kGameInputStand << 1
,   kGameInputNoMoreTricks = kGameInputWithoutThree << 1
,   kGameInputTakeRemainingTricks = kGameInputNoMoreTricks << 1
,   kGameInputTricksMinusThree = kGameInputTakeRemainingTricks << 1
,   kGameInputTricksMinusTwo = kGameInputTricksMinusThree << 1
,   kGameInputTricksMinusOne = kGameInputTricksMinusTwo << 1
,   kGameInputTricksByContract = kGameInputTricksMinusOne << 1
,   kGameInputTricksPlusOne = kGameInputTricksByContract << 1
,   kGameInputTricksPlusTwo = kGameInputTricksPlusOne << 1
,   kGameInputTricksPlusThree = kGameInputTricksPlusTwo << 1
,   kGameInputWhistPass = kGameInputTricksPlusThree << 1
,   kGameInputTrickingTenCheck = kGameInputWhistPass << 1
,   kGameInputTrickingTenConfirm = kGameInputTrickingTenCheck << 1
,   kGameInputMisereConfirm = kGameInputTrickingTenConfirm << 1
} PSGameInputFlag;

@interface PSGameInputOptions : NSObject

@property (nonatomic, readwrite) PSBid *bid;

@property (nonatomic, readwrite) uint8_t hand;

@property (nonatomic, readwrite) int score;

@property (nonatomic, readonly) BOOL isHumanInputRequired;

-(void)clear;

-(void)setFlag:(PSGameInputFlag)flag;

-(void)clearFlag:(PSGameInputFlag)flag;

-(BOOL)checkFlag:(PSGameInputFlag)flag;

@end
